# -*- coding: UTF-8 -*-
'''
@Project ：pythonProject 
@File    ：giveDemo.py
@Author  ：siwei
@Date    ：2023/5/16 23:02 
'''
# 赋值运算符 =  从右往左赋值
a = 3 + 8
# 链式赋值
b = c = 3
print(a, b, id(b), c, id(c))

# 参数赋值
a += 4  # a=a+4
print(a)

b *= 2  # b=b*2
print(b)

a /= 2  # a=a/2
print(a, type(a))

a //= 2  # a=a//2
print(a, type(a))

a %= 2  # a=a%2
print(a, type(a))

# 系列解包类型  等号左右个数相等
d, e, f = 10, 11, 12
print(d, e, f)

# 交换变量值
a,b=10,20
print("交换前:",a,b)
a,b=b,a
print("交换后:",a,b)
